function manhattan_similarity_matrix = getManhattanSimilarityKernel(y)
    krnl = y * y';
    y = krnl / mean(diag(krnl));
    
    % 计算行（疾病）之间的曼哈顿距离
    manhattan_distance_matrix = pdist(y, 'cityblock');
    
    % 将距离矩阵转换为方阵
    manhattan_distance_matrix = squareform(manhattan_distance_matrix);
    
    % 将距离转换为相似性
    manhattan_similarity_matrix = 1 ./ (1 + manhattan_distance_matrix);
    
    nan_rows = any(isnan(manhattan_similarity_matrix), 2);
    
    % 将包含 NaN 的行替换为 0
    manhattan_similarity_matrix(nan_rows, :) = 0;
end
